<!DOCTYPE html>
<html>

<head>
  <title></title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="../bootstrap-5.1.3-dist/css/bootstrap.css" rel="stylesheet">
  <script src="../bootstrap-5.1.3-dist/js/bootstrap.bundle.min.js"></script>
</head>

<body class="container">
  <a href="#" type="button" class="btn btn-primary" data-bs-toggle="tooltip" title="将跳转到注册页面">注册</a>
  <span data-bs-toggle="tooltip" title="禁用的按钮">
    <button class="btn btn-primary" type="button" disabled>禁用按钮</button>
  </span>

  <script>
    var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
    var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
      return new bootstrap.Tooltip(tooltipTriggerEl)
    })
  </script>

</body>

</html>